var app = angular.module('main', []);
app.controller('con', function($scope,$http) {
    var cart = new Array();
    $scope.cart=[];
    $scope.total=0;
    var pushflag=2;
    /*json文件数据*/
    $http.get("data.json").success(function(response) {
        $scope.temp = response.products;
    });
    /*添加*/
    $scope.cx = function (date) {
        myChart.hideLoading();
        myChart.setOption({
            xAxis: {
                data: temp.categories
            },
            series: [{
                // 根据名字对应到相应的系列
                data: $scope.temp .data.data
            }]
        });
    }
       /* angular.forEach($scope.cart, function(data,index){})*/
       
});
